/*
 * IndexingPolicy.cc
 *
 *  Created on: Mar 9, 2013
 *      Author: neo
 */

#include <cstdlib>

#include "../index/InvertedIndex.h"
#include "AbstractIndexingPolicy.h"

AbstractIndexingPolicy::AbstractIndexingPolicy(InvertedIndex* index) :
    m_index(index) {

}

AbstractIndexingPolicy::~AbstractIndexingPolicy() {
  if (this->m_index) {
    delete this->m_index;
    this->m_index = NULL;
  }
}

void AbstractIndexingPolicy::add_report(const vector<Term>& terms,
    AbstractBugReport& bug_report) const {
  this->m_index->add_report(terms, bug_report);
}
